determine the current in each branch of the network